﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace My.Core.Model.Models
{
    /// <summary>
    /// 模块-菜单
    /// </summary>
    public class FrameworkMenu
    {

        /// <summary>
        /// 主键Id
        /// </summary>
        [DisplayName("主键Id")]
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
        /// <summary>
        ///获取或设置是否禁用，逻辑上的删除，非物理删除
        /// </summary>
        [Display(Name = "是否删除")]
        [DefaultValue(false)]
        public bool? IsDeleted { get; set; }


        /// <summary>
        /// 父ID
        /// </summary>
        [Display(Name = "父ID", Description = "")]
        public int? ParentId { get; set; }
        /// <summary>
        /// 页面名称
        /// </summary>
        [Display(Name = "页面名称", Description = "")]
        [StringLength(100)]
        [Required(ErrorMessage = "页面名称不能为空")]
        public string PageName { get; set; }
        /// <summary>
        /// 菜单链接地址
        /// </summary>
        [Display(Name = "菜单链接地址", Description = "")]
        [StringLength(100)]
        [Required(ErrorMessage = "菜单链接地址")]
        public string LinkUrl { get; set; }

        /// <summary>
        /// 控制器名称
        /// </summary>
        [Display(Name = "控制器名称")]
        [StringLength(100)]
        public string ControllerName { get; set; }

        /// <summary>
        /// 控制器
        /// </summary>
        [Display(Name = "控制器名称")]
        [StringLength(100)]

        public string Controller { get; set; }
        /// <summary>
        /// Action名称
        /// </summary>

        [Display(Name = "Action名称")]
        [StringLength(100)]
        public string ActionName { get; set; }

        /// <summary>
        /// Action
        /// </summary>
        [Display(Name = "Action")]
        [StringLength(100)]
        public string Action { get; set; }

        /// <summary>
        /// ClassName
        /// </summary>
        [Display(Name = "ClassName")]
        [StringLength(100)]
        public string ClassName { get; set; }


        /// <summary>
        /// 图标
        /// </summary>
        [Display(Name = "图标")]
        [StringLength(100)]
        public string Icon { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [Display(Name = "排序")]
        [DefaultValue(0)]
        public int OrderSort { get; set; }
        /// <summary>
        /// /描述
        /// </summary>
        [Display(Name = "描述")]
        public string Description { get; set; }

        /// <summary>
        /// 是否是右侧菜单
        /// </summary>
        [Display(Name = "是否是右侧菜单")]
        [DefaultValue(false)]
        [Required]
        public bool IsMenu { get; set; }


        /// <summary>
        /// 是否目录
        /// </summary>
        [Display(Name = "是否目录")]
        [DefaultValue(false)]
        [Required]
        public bool IsDir { get; set; }



        /// <summary>
        /// 是否激活
        /// </summary>
        [Display(Name = "是否激活")]
        public bool Enabled { get; set; }
        /// <summary>
        /// 创建ID
        /// </summary>
        [Display(Name = "创建ID")]
        public int? CreateId { get; set; }
        /// <summary>
        /// 创建者
        /// </summary>
        [Display(Name = "创建者")]
        [StringLength(50)]
        public string CreateBy { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        public DateTime CreateTime { get; set; } = DateTime.Now;
        /// <summary>
        /// 修改ID
        /// </summary>
        [Display(Name = "修改ID")]
        public int? ModifyId { get; set; }
        /// <summary>
        /// 修改者
        /// </summary>
        [Display(Name = "修改者")]
        public string ModifyBy { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        [Display(Name = "修改时间")]
        public DateTime? ModifyTime { get; set; } = DateTime.Now;

    }


}
